package Others.DesignPattern.ObserverPattern.Pattern.Object;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;


@Setter
@Getter
@AllArgsConstructor
public class Boss extends Secretary{

    @Override
    public void AddObserver(Observer observer) {
        observersList.add(observer);
    }

    @Override
    public void DropObserver(Observer observer) {
        observersList.remove(observer);
    }

    @Override
    public void NotifyObserver() {
        for (Observer observers: observersList) {
            observers.update();
        }
    }


}
